/**
 * 权限相关的数据
 * Created by gcc on 2017/9/29.
 */
import Vue from "vue";

// 页码相关
let page = {
  total: 1,
  startIndex: 0,
  stepNumber: 20,
  currentPage: 1
};

//页面状态相关
let status = {
  //新建或编辑员工的弹出框
  modalModify: {
    isShow: false,
    isModify: false,
    title: "",
    isLoading: true,
  },
  //删除员工的 modal
  modalDelete: {
    isShow: false,
    isLoading: false,
    role: {}
  },
  rules: {
    name: [
      {required: true, message: '姓名不能为空', trigger: 'blur'}
    ],
    note:[
      {required: true, message: '备注不能为空,请填写角色的职能说明', trigger: 'blur'}
    ]
  },

};

// 和网络交互相关的参数
let params = {
  //新角色或者编辑的角色弹出框的数据
  role: {
    id: '',
    name: '',
    yunFolders: '',
    note: '',
    roleFunctions: {}
  },
  roleNameSearch: ''
};

// 页面的数据源
let data = {
  roleList: []
};

let treeDatas = {

//一级权限
  roleModules: {},
  //二级权限
  roleFunctions: {},
  //树形权限数据
  roleTreeData: [],


  //已选中的权限
  selectedRoles:[],


  //3.6新增
  authRoles:[],
  authTreeData:[]

};



let role = {
  roleAdd:false,
  roleEdit:false,
  roleDelete:false,
};

export  default  {
  tPage: page,
  tStatus: status,
  tParams: params,
  tTreeDatas: treeDatas,
  tData: data,
  tRole:{}
};
